3.1.13 \(\int \frac {1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))} \, dx\) [13]

Optimal. Leaf size=121 \[ \frac {2 a \text {ArcTan}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} \sqrt {a+b} (a c-b d) f}-\frac {2 d \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{\sqrt {c-d} \sqrt {c+d} (a c-b d) f} \]

[Out]

2*a*arctan((a-b)^(1/2)*tan(1/2*f*x+1/2*e)/(a+b)^(1/2))/(a*c-b*d)/f/(a-b)^(1/2)/(a+b)^(1/2)-2*d*arctanh((c-d)^(
1/2)*tan(1/2*f*x+1/2*e)/(c+d)^(1/2))/(a*c-b*d)/f/(c-d)^(1/2)/(c+d)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.19, antiderivative size = 121, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {2907, 3080, 2738, 211, 214} \begin {gather*} \frac {2 a \text {ArcTan}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{f \sqrt {a-b} \sqrt {a+b} (a c-b d)}-\frac {2 d \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{f \sqrt {c-d} \sqrt {c+d} (a c-b d)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/((a + b*Cos[e + f*x])*(c + d*Sec[e + f*x])),x]

[Out]

(2*a*ArcTan[(Sqrt[a - b]*Tan[(e + f*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*(a*c - b*d)*f) - (2*d*ArcTan
h[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(Sqrt[c - d]*Sqrt[c + d]*(a*c - b*d)*f)

Rule 211

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/Rt[a/b, 2]], x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 2738

Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]

Rule 2907

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> In
t[(a + b*Sin[e + f*x])^m*((d + c*Sin[e + f*x])^n/Sin[e + f*x]^n), x] /; FreeQ[{a, b, c, d, e, f, m}, x] && Int
egerQ[n]

Rule 3080

Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.)
+ (f_.)*(x_)])), x_Symbol] :> Dist[(A*b - a*B)/(b*c - a*d), Int[1/(a + b*Sin[e + f*x]), x], x] + Dist[(B*c - A
*d)/(b*c - a*d), Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0]
 && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]

Rubi steps

\begin {align*} \int \frac {1}{(a+b \cos (e+f x)) (c+d \sec (e+f x))} \, dx &=\int \frac {\cos (e+f x)}{(a+b \cos (e+f x)) (d+c \cos (e+f x))} \, dx\\ &=\frac {a \int \frac {1}{a+b \cos (e+f x)} \, dx}{a c-b d}-\frac {d \int \frac {1}{d+c \cos (e+f x)} \, dx}{a c-b d}\\ &=\frac {(2 a) \text {Subst}\left (\int \frac {1}{a+b+(a-b) x^2} \, dx,x,\tan \left (\frac {1}{2} (e+f x)\right )\right )}{(a c-b d) f}-\frac {(2 d) \text {Subst}\left (\int \frac {1}{c+d+(-c+d) x^2} \, dx,x,\tan \left (\frac {1}{2} (e+f x)\right )\right )}{(a c-b d) f}\\ &=\frac {2 a \tan ^{-1}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{\sqrt {a-b} \sqrt {a+b} (a c-b d) f}-\frac {2 d \tanh ^{-1}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{\sqrt {c-d} \sqrt {c+d} (a c-b d) f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.26, size = 106, normalized size = 0.88 \begin {gather*} \frac {-\frac {2 a \tanh ^{-1}\left (\frac {(a-b) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {-a^2+b^2}}\right )}{\sqrt {-a^2+b^2}}+\frac {2 d \tanh ^{-1}\left (\frac {(-c+d) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{\sqrt {c^2-d^2}}}{a c f-b d f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/((a + b*Cos[e + f*x])*(c + d*Sec[e + f*x])),x]

[Out]

((-2*a*ArcTanh[((a - b)*Tan[(e + f*x)/2])/Sqrt[-a^2 + b^2]])/Sqrt[-a^2 + b^2] + (2*d*ArcTanh[((-c + d)*Tan[(e
+ f*x)/2])/Sqrt[c^2 - d^2]])/Sqrt[c^2 - d^2])/(a*c*f - b*d*f)

________________________________________________________________________________________

Maple [A]
time = 0.43, size = 108, normalized size = 0.89

method result size
derivativedivides \(\frac {\frac {2 a \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a c -b d \right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}-\frac {2 d \arctanh \left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (a c -b d \right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}}{f}\) \(108\)
default \(\frac {\frac {2 a \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a c -b d \right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}-\frac {2 d \arctanh \left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c +d \right ) \left (c -d \right )}}\right )}{\left (a c -b d \right ) \sqrt {\left (c +d \right ) \left (c -d \right )}}}{f}\) \(108\)
risch \(\frac {d \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i c^{2}-i d^{2}-d \sqrt {c^{2}-d^{2}}}{\sqrt {c^{2}-d^{2}}\, c}\right )}{\sqrt {c^{2}-d^{2}}\, \left (a c -b d \right ) f}-\frac {d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c^{2}-i d^{2}+d \sqrt {c^{2}-d^{2}}}{\sqrt {c^{2}-d^{2}}\, c}\right )}{\sqrt {c^{2}-d^{2}}\, \left (a c -b d \right ) f}-\frac {a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a^{2}-i b^{2}+a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a c -b d \right ) f}+\frac {a \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i a^{2}-i b^{2}-a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a c -b d \right ) f}\) \(320\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/f*(2*a/(a*c-b*d)/((a-b)*(a+b))^(1/2)*arctan((a-b)*tan(1/2*f*x+1/2*e)/((a-b)*(a+b))^(1/2))-2*d/(a*c-b*d)/((c+
d)*(c-d))^(1/2)*arctanh((c-d)*tan(1/2*f*x+1/2*e)/((c+d)*(c-d))^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*c^2-4*d^2>0)', see `assume?`
 for more de

________________________________________________________________________________________

Fricas [A]
time = 1.87, size = 1054, normalized size = 8.71 \begin {gather*} \left [-\frac {{\left (a^{2} - b^{2}\right )} \sqrt {c^{2} - d^{2}} d \log \left (\frac {2 \, c d \cos \left (f x + e\right ) - {\left (c^{2} - 2 \, d^{2}\right )} \cos \left (f x + e\right )^{2} + 2 \, \sqrt {c^{2} - d^{2}} {\left (d \cos \left (f x + e\right ) + c\right )} \sin \left (f x + e\right ) + 2 \, c^{2} - d^{2}}{c^{2} \cos \left (f x + e\right )^{2} + 2 \, c d \cos \left (f x + e\right ) + d^{2}}\right ) - {\left (a c^{2} - a d^{2}\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {2 \, a b \cos \left (f x + e\right ) + {\left (2 \, a^{2} - b^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cos \left (f x + e\right ) + b\right )} \sin \left (f x + e\right ) - a^{2} + 2 \, b^{2}}{b^{2} \cos \left (f x + e\right )^{2} + 2 \, a b \cos \left (f x + e\right ) + a^{2}}\right )}{2 \, {\left ({\left (a^{3} - a b^{2}\right )} c^{3} - {\left (a^{2} b - b^{3}\right )} c^{2} d - {\left (a^{3} - a b^{2}\right )} c d^{2} + {\left (a^{2} b - b^{3}\right )} d^{3}\right )} f}, -\frac {2 \, {\left (a^{2} - b^{2}\right )} \sqrt {-c^{2} + d^{2}} d \arctan \left (-\frac {\sqrt {-c^{2} + d^{2}} {\left (d \cos \left (f x + e\right ) + c\right )}}{{\left (c^{2} - d^{2}\right )} \sin \left (f x + e\right )}\right ) - {\left (a c^{2} - a d^{2}\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {2 \, a b \cos \left (f x + e\right ) + {\left (2 \, a^{2} - b^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cos \left (f x + e\right ) + b\right )} \sin \left (f x + e\right ) - a^{2} + 2 \, b^{2}}{b^{2} \cos \left (f x + e\right )^{2} + 2 \, a b \cos \left (f x + e\right ) + a^{2}}\right )}{2 \, {\left ({\left (a^{3} - a b^{2}\right )} c^{3} - {\left (a^{2} b - b^{3}\right )} c^{2} d - {\left (a^{3} - a b^{2}\right )} c d^{2} + {\left (a^{2} b - b^{3}\right )} d^{3}\right )} f}, -\frac {{\left (a^{2} - b^{2}\right )} \sqrt {c^{2} - d^{2}} d \log \left (\frac {2 \, c d \cos \left (f x + e\right ) - {\left (c^{2} - 2 \, d^{2}\right )} \cos \left (f x + e\right )^{2} + 2 \, \sqrt {c^{2} - d^{2}} {\left (d \cos \left (f x + e\right ) + c\right )} \sin \left (f x + e\right ) + 2 \, c^{2} - d^{2}}{c^{2} \cos \left (f x + e\right )^{2} + 2 \, c d \cos \left (f x + e\right ) + d^{2}}\right ) - 2 \, {\left (a c^{2} - a d^{2}\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \cos \left (f x + e\right ) + b}{\sqrt {a^{2} - b^{2}} \sin \left (f x + e\right )}\right )}{2 \, {\left ({\left (a^{3} - a b^{2}\right )} c^{3} - {\left (a^{2} b - b^{3}\right )} c^{2} d - {\left (a^{3} - a b^{2}\right )} c d^{2} + {\left (a^{2} b - b^{3}\right )} d^{3}\right )} f}, -\frac {{\left (a^{2} - b^{2}\right )} \sqrt {-c^{2} + d^{2}} d \arctan \left (-\frac {\sqrt {-c^{2} + d^{2}} {\left (d \cos \left (f x + e\right ) + c\right )}}{{\left (c^{2} - d^{2}\right )} \sin \left (f x + e\right )}\right ) - {\left (a c^{2} - a d^{2}\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \cos \left (f x + e\right ) + b}{\sqrt {a^{2} - b^{2}} \sin \left (f x + e\right )}\right )}{{\left ({\left (a^{3} - a b^{2}\right )} c^{3} - {\left (a^{2} b - b^{3}\right )} c^{2} d - {\left (a^{3} - a b^{2}\right )} c d^{2} + {\left (a^{2} b - b^{3}\right )} d^{3}\right )} f}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e)),x, algorithm="fricas")

[Out]

[-1/2*((a^2 - b^2)*sqrt(c^2 - d^2)*d*log((2*c*d*cos(f*x + e) - (c^2 - 2*d^2)*cos(f*x + e)^2 + 2*sqrt(c^2 - d^2
)*(d*cos(f*x + e) + c)*sin(f*x + e) + 2*c^2 - d^2)/(c^2*cos(f*x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) - (a*c^2 -
 a*d^2)*sqrt(-a^2 + b^2)*log((2*a*b*cos(f*x + e) + (2*a^2 - b^2)*cos(f*x + e)^2 - 2*sqrt(-a^2 + b^2)*(a*cos(f*
x + e) + b)*sin(f*x + e) - a^2 + 2*b^2)/(b^2*cos(f*x + e)^2 + 2*a*b*cos(f*x + e) + a^2)))/(((a^3 - a*b^2)*c^3
- (a^2*b - b^3)*c^2*d - (a^3 - a*b^2)*c*d^2 + (a^2*b - b^3)*d^3)*f), -1/2*(2*(a^2 - b^2)*sqrt(-c^2 + d^2)*d*ar
ctan(-sqrt(-c^2 + d^2)*(d*cos(f*x + e) + c)/((c^2 - d^2)*sin(f*x + e))) - (a*c^2 - a*d^2)*sqrt(-a^2 + b^2)*log
((2*a*b*cos(f*x + e) + (2*a^2 - b^2)*cos(f*x + e)^2 - 2*sqrt(-a^2 + b^2)*(a*cos(f*x + e) + b)*sin(f*x + e) - a
^2 + 2*b^2)/(b^2*cos(f*x + e)^2 + 2*a*b*cos(f*x + e) + a^2)))/(((a^3 - a*b^2)*c^3 - (a^2*b - b^3)*c^2*d - (a^3
 - a*b^2)*c*d^2 + (a^2*b - b^3)*d^3)*f), -1/2*((a^2 - b^2)*sqrt(c^2 - d^2)*d*log((2*c*d*cos(f*x + e) - (c^2 -
2*d^2)*cos(f*x + e)^2 + 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + c)*sin(f*x + e) + 2*c^2 - d^2)/(c^2*cos(f*x + e)^2
 + 2*c*d*cos(f*x + e) + d^2)) - 2*(a*c^2 - a*d^2)*sqrt(a^2 - b^2)*arctan(-(a*cos(f*x + e) + b)/(sqrt(a^2 - b^2
)*sin(f*x + e))))/(((a^3 - a*b^2)*c^3 - (a^2*b - b^3)*c^2*d - (a^3 - a*b^2)*c*d^2 + (a^2*b - b^3)*d^3)*f), -((
a^2 - b^2)*sqrt(-c^2 + d^2)*d*arctan(-sqrt(-c^2 + d^2)*(d*cos(f*x + e) + c)/((c^2 - d^2)*sin(f*x + e))) - (a*c
^2 - a*d^2)*sqrt(a^2 - b^2)*arctan(-(a*cos(f*x + e) + b)/(sqrt(a^2 - b^2)*sin(f*x + e))))/(((a^3 - a*b^2)*c^3
- (a^2*b - b^3)*c^2*d - (a^3 - a*b^2)*c*d^2 + (a^2*b - b^3)*d^3)*f)]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{\left (a + b \cos {\left (e + f x \right )}\right ) \left (c + d \sec {\left (e + f x \right )}\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e)),x)

[Out]

Integral(1/((a + b*cos(e + f*x))*(c + d*sec(e + f*x))), x)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 511 vs. \(2 (105) = 210\).
time = 0.53, size = 511, normalized size = 4.22 \begin {gather*} \frac {\frac {{\left (\sqrt {a^{2} - b^{2}} a c {\left | a - b \right |} - \sqrt {a^{2} - b^{2}} {\left (2 \, a - b\right )} d {\left | a - b \right |} + \sqrt {a^{2} - b^{2}} {\left | a c - b d \right |} {\left | a - b \right |}\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {\frac {b c - a d + \sqrt {{\left (a c + b c + a d + b d\right )} {\left (a c - b c - a d + b d\right )} + {\left (b c - a d\right )}^{2}}}{a c - b c - a d + b d}}}\right )\right )}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} {\left (a c - b d\right )}^{2} + {\left (a^{2} b - 2 \, a b^{2} + b^{3}\right )} c {\left | a c - b d \right |} - {\left (a^{3} - 2 \, a^{2} b + a b^{2}\right )} d {\left | a c - b d \right |}} + \frac {{\left (\sqrt {-c^{2} + d^{2}} a {\left (c - 2 \, d\right )} {\left | -c + d \right |} + \sqrt {-c^{2} + d^{2}} b d {\left | -c + d \right |} - \sqrt {-c^{2} + d^{2}} {\left | a c - b d \right |} {\left | -c + d \right |}\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor + \arctan \left (\frac {\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {\frac {b c - a d - \sqrt {{\left (a c + b c + a d + b d\right )} {\left (a c - b c - a d + b d\right )} + {\left (b c - a d\right )}^{2}}}{a c - b c - a d + b d}}}\right )\right )}}{{\left (a c - b d\right )}^{2} {\left (c^{2} - 2 \, c d + d^{2}\right )} + {\left (c^{2} d - 2 \, c d^{2} + d^{3}\right )} a {\left | a c - b d \right |} - {\left (c^{3} - 2 \, c^{2} d + c d^{2}\right )} b {\left | a c - b d \right |}}}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+b*cos(f*x+e))/(c+d*sec(f*x+e)),x, algorithm="giac")

[Out]

((sqrt(a^2 - b^2)*a*c*abs(a - b) - sqrt(a^2 - b^2)*(2*a - b)*d*abs(a - b) + sqrt(a^2 - b^2)*abs(a*c - b*d)*abs
(a - b))*(pi*floor(1/2*(f*x + e)/pi + 1/2) + arctan(tan(1/2*f*x + 1/2*e)/sqrt((b*c - a*d + sqrt((a*c + b*c + a
*d + b*d)*(a*c - b*c - a*d + b*d) + (b*c - a*d)^2))/(a*c - b*c - a*d + b*d))))/((a^2 - 2*a*b + b^2)*(a*c - b*d
)^2 + (a^2*b - 2*a*b^2 + b^3)*c*abs(a*c - b*d) - (a^3 - 2*a^2*b + a*b^2)*d*abs(a*c - b*d)) + (sqrt(-c^2 + d^2)
*a*(c - 2*d)*abs(-c + d) + sqrt(-c^2 + d^2)*b*d*abs(-c + d) - sqrt(-c^2 + d^2)*abs(a*c - b*d)*abs(-c + d))*(pi
*floor(1/2*(f*x + e)/pi + 1/2) + arctan(tan(1/2*f*x + 1/2*e)/sqrt((b*c - a*d - sqrt((a*c + b*c + a*d + b*d)*(a
*c - b*c - a*d + b*d) + (b*c - a*d)^2))/(a*c - b*c - a*d + b*d))))/((a*c - b*d)^2*(c^2 - 2*c*d + d^2) + (c^2*d
 - 2*c*d^2 + d^3)*a*abs(a*c - b*d) - (c^3 - 2*c^2*d + c*d^2)*b*abs(a*c - b*d)))/f

________________________________________________________________________________________

Mupad [B]
time = 4.79, size = 2665, normalized size = 22.02 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((c + d/cos(e + f*x))*(a + b*cos(e + f*x))),x)

[Out]

(a*c^2*atan((a^5*c^2*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(1/2)*1i + a^3*d^2*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(3/2)*2i
 + a^5*d^2*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(1/2)*2i - b^5*d^2*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(1/2)*1i - a^2*b^3
*c^2*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(1/2)*1i - a^3*b^2*c^2*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(1/2)*1i + a^2*b^3*d
^2*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(1/2)*1i - a^3*b^2*d^2*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(1/2)*3i - a^3*c*d*tan
(e/2 + (f*x)/2)*(b^2 - a^2)^(3/2)*2i - a^5*c*d*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(1/2)*2i + a^2*b*c^2*tan(e/2 + (
f*x)/2)*(b^2 - a^2)^(3/2)*2i + a^4*b*c^2*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(1/2)*1i + a*b^4*d^2*tan(e/2 + (f*x)/2
)*(b^2 - a^2)^(1/2)*1i + a^2*b^3*c*d*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(1/2)*2i + a^3*b^2*c*d*tan(e/2 + (f*x)/2)*
(b^2 - a^2)^(1/2)*2i - a^2*b*c*d*tan(e/2 + (f*x)/2)*(b^2 - a^2)^(3/2)*2i - a^4*b*c*d*tan(e/2 + (f*x)/2)*(b^2 -
 a^2)^(1/2)*2i)/(a^6*c^2 - b^6*d^2 + a^2*b^4*c^2 - 2*a^4*b^2*c^2 + 2*a^2*b^4*d^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(a^3*c^3 - b^3*d^3 - a*b^2*c^3 + a^2*b*d^3 - a^3*c*d^2 + b^3*c^2*d + a*b^2*c*d^2 - a^2*b*c^2*d)
)

________________________________________________________________________________________